﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace ElingOA6_DSJCJ.BLL
{
    /// <summary>
    /// 人员BLL
    /// </summary>
    public class HREmpl
    {
        /// <summary>
        /// 人员DAL
        /// </summary>
        private readonly DAL.HREmpl dal = new DAL.HREmpl();
        /// <summary>
        /// 构造方法
        /// </summary>
        public HREmpl()
        { }

       
        /// <summary>
        /// 根据员工编号从V_HREmpl中获得数据列表
        /// <creator>wangl</creator>
        /// <date>2013-07-18</date>
        /// </summary>
        /// <param name="emplNo">员工</param>
        /// <param name="entityNo">公司编号</param>
        /// <returns>DataSet对象</returns>
        public DataSet GetEmplFromViewByEmplNo(string emplNo, string entityNo)
        {
            return dal.GetEmplFromViewByEmplNo(emplNo, entityNo);
        }

         /// <summary>
        /// 获取人员名称
        /// <creator>wangl</creator>
        /// <date>2013-09-25</date>
        /// </summary>
        /// <param name="entityNo">组织机构编号</param>
        /// <param name="empNo">人员编号</param>
        /// <returns>人员名称</returns>
        public string GetEmpName(string entityNo, string empNo)
        {
            return dal.GetEmpName(entityNo, empNo);
        }

        /// <summary>
        /// 获取是否需要考勤
        /// <creator>chenly</creator>
        /// <date>2014-03-11</date>
        /// </summary>
        /// <param name="entityNo">组织机构编号</param>
        /// <param name="empNo">人员编号</param>
        /// <returns>人员名称</returns>
        public string GetIsAttendance(string entityNo, string empNo)
        {
            return dal.GetIsAttendance(entityNo, empNo);
        }
        /// <summary>
        /// 获取考勤IP
        /// <creator>chenly(wangl引用)</creator>
        /// <date>2014-03-11</date>
        /// </summary>
        /// <param name="entityNo">组织机构编号</param>
        /// <param name="empNo">人员编号</param>
        /// <returns>人员名称</returns>
        public string GetAttendanceIpAddress(string entityNo, string empNo)
        {
            return dal.GetAttendanceIpAddress(entityNo, empNo);
        }
        /// <summary>
        /// 设置考勤IP地址绑定
        /// </summary>
        /// <param name="entityNo"></param>
        /// <param name="empNo"></param>
        /// <param name="attendanceIpAddress"></param>
        public void UpdateAttendanceIpAddress(string entityNo, string empNo, string attendanceIpAddress)
        {
            dal.UpdateAttendanceIpAddress(entityNo, empNo, attendanceIpAddress);
        }
        /// <summary>
        /// 获取生日人员
        /// <creator>sunlj</creator>
        /// <date>2014-10-27</date>
        /// </summary>
        /// <param name="strWhere"></param>
        /// <returns></returns>
        public DataTable GetListBirth(string strWhere)
        {
            return dal.GetListBirth(strWhere).Tables[0];
        }
    }
}
